package cn.hhchat.wp.dto.msg;

import lombok.Getter;

/**
 * Created this one by HMH on 2017/6/15.
 * 结果代码及消息 枚举
 */
@Getter
public enum ResultEnum {

    Success(0,"ok"),

    /**
     * 用户状态嘞
     */

    UnAuthentication(100, "未登陆"),
    UnRegUser(101, "未注册"),

    /**
     * 数据处理类
     */

    NotFindUser(200,"不存在的用户"),
    InValidCode(201,"验证码错误"),
    NoMoreData(202,"没有更多的数据了"),
    InValidField(203,"数据错误"),
    DupUserReg(205, "重复注册"),
    BadQuery(206, "查询的对象不存在"),
    DupOp(207, "该数据已被处理"),
    Forbidden(210, "禁止该操作"),
    GetFormFailed(211, "初始化表单失败"),

    /**
     * 权限类
     */

    UnAuthorized(300, "权限不足"),

    /*
     * 系统错误
     */

    FileSystemError(500, "文件系统错误"),
    BadNetWorkError(501, "网络访问错误"),
    SmsSendError(502, "短信发送失败"),
    EmailSendError(503, "邮件发送失败"),

    /**
     * 其他
     */

    UnKnowException(-1,"非期望错误"),
    ;

    private Integer errcode;
    private String errmsg;

    ResultEnum(int errcode,String errmsg) {
        this.errcode = errcode;
        this.errmsg = errmsg;
    }

}
